const { ethers } = require('ethers')
const abi = require('./abi.json')

const address = '0x49d130eEb639c910e44EF77AB02946Da690b4d7a'
const bscTestRpcUrl = 'https://data-seed-prebsc-1-s1.binance.org:8545'
const provider = new ethers.providers.JsonRpcProvider(bscTestRpcUrl)

// The Contract object
const daiContract = new ethers.Contract(address, abi, provider)

daiContract.on('Polling', (...args) => {
  console.log('args', args)
})

console.log('事件监听中: ')
